How can I format this date to a simple one? I am using date-fns as in my react project
2021-12-26T00:00:00.000000Z
You can use as below.
import { format } from 'date-fns
format(new Date('2021-12-26T00:00:00.000000Z'), 'yyyy-MM-dd')
Output will be:
"2021-12-26"